package scene;

import java.awt.event.*;
import java.util.List;

import javax.swing.SwingUtilities;

import scene.composants.IDessinableManipulable;


/**
 * 
 * @author Delmas Gabriel
 */
public class SceneMouseListener extends MouseAdapter implements MouseWheelListener
{
	protected SceneEditeur scene;
	protected List<IDessinableManipulable> composants;
	
	public SceneMouseListener(SceneEditeur scene)
	{
		super();
		this.scene = scene;
		this.scene.addMouseListener(this);
		this.scene.addMouseWheelListener(this);
	}
		
	public SceneEditeur getSceneEditeur() {
		return this.scene;
	}
	
	public void mouseClicked(MouseEvent e)
	{
		if (SwingUtilities.isLeftMouseButton(e))
		{
			leftClickAction(e);
	
		}
		else
		{
			rightClickAction(e);
		}
		
	}
	

	protected void rightClickAction(MouseEvent e)
	{
		
			
	}

	
	protected void leftClickAction(MouseEvent e)
	{
	
		
	}

	public void mouseWheelMoved(MouseWheelEvent e)
	{
/*
		//Vers utilisateur
		if(e.getWheelRotation() == 1)
		{
			this.scene.zoomIn();
		}
		if(e.getWheelRotation() == -1)
		{
			this.scene.zoomOut();
		}
		this.scene.update();*/
	}
}